package com.ysd.lis.controller.inv;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.inv.InvStoreManage;
import com.ysd.lis.request.CommonPageDto;
import com.ysd.lis.service.inv.InvStoreManageService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 仓库管理 前端控制器
 * </p>
 *
 * @author WH
 * @since 2024-09-09
 */
@RestController
@RequestMapping("/inv/storeManage")
public class InvStoreManageController extends BaseController {

    @Autowired
    private InvStoreManageService reStoreManageService;

    @ApiOperation("获取仓库列表")
    @GetMapping("/findStoreManageList")
    public Result findStoreManageList(CommonPageDto params) {
        return reStoreManageService.findStoreManageList(params);
    }

    @ApiOperation("获取仓库列表")
    @GetMapping("/findStoreManageTree")
    public Result findStoreManageTree() {
        return reStoreManageService.findStoreManageTree();
    }

    @ApiOperation("获取可调拨入库出库仓库列表")
    @GetMapping("/getJoinOrMoveStore")
    public Result getJoinOrMoveStore(CommonPageDto params) {

        return reStoreManageService.getJoinOrMoveStore(params);
    }

    @ApiOperation("批量新增或修改")
    @PostMapping("/saveOrUpdateStoreManage")
    public Result saveOrUpdateStoreManage(@RequestBody InvStoreManage invStoreManage) {
        return reStoreManageService.saveOrUpdateStoreManage(invStoreManage);
    }

    @ApiOperation("批量删除")
    @PostMapping("/deleteStoreManage")
    public Result deleteStoreManage(@RequestBody InvStoreManage invStoreManage) {
        return reStoreManageService.deleteStoreManage(invStoreManage);
    }


}
